from pattern.circuit import Control


class entry(Control):
	
	def incoming(self, event):
		username, = event.data
		bridge = self.acquireInterface(event, "left:20%")
		if bridge is not None:
			bridge.push("leave", username)
		bridge = self.acquireInterface(event, "left:80%")
		if bridge is not None:
			bridge.push("part", None, username)
